package com.yzd.learnjava.typeinfo.pets;

import com.yzd.learnjava.util.Print;

public class PetCount4 {
	public static void main(String[] args) {
		TypeCounter counter = new TypeCounter(Pet.class);
		for(Pet pet : Pets.createArray(20)) {
			Print.printnb(pet.getClass().getSimpleName() + " ");
			counter.count(pet);
		}
		
		Print.print();
		Print.print(counter);
	}
}
